home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
TDE.ARJ
/
TDTXT1.DOC
< prev
Wrap
Text File
|
1992-07-17
|
4KB
|
108 lines
/***************************************************************************
FILENAME - TDTXT1.DOC: Corrections/modifications to TDE.ZIP
-----------------------------------------------------------
Class TDataEntry v1.0 - 07/14/92
--------------------------------
----------------------------------------------------------------------------
Author: Jeff Penrose * JDP Custom Software * (818) 344-7303 * CIS 71043,3727
----------------------------------------------------------------------------
A data entry class for Borland's Turbo Vision, derived from TInputLine.
Copyright Notice
================
As this material is ultimately derived from Borland source files, any of
their copyrights which MAY apply DO apply.
From the author's standpoint, you may use this material freely and,
hopefully, post any comments/corrections/enhancements to me at the above-
noted addresses. I do ask that you not distribute this material except as
originally received, including all source/documentation files in their
original form.
If you DO modify or enhance any of this code, please send any such changes
to me for incorporation into a future version. Any such enhancements will
be DONATED, without expectation of compensation or incorporation into
future versions. Again, if you distribute this code, please do so in its
original, unmodified form including all source files and documentation.
>> YOUR USE OF THIS SOFTWARE IS ENTIRELY AT YOUR OWN RISK. THE AUTHOR WILL
>> NOT BE HELD LIABLE IN ANY CASE FOR FAILURE OF THIS SOFTWARE TO PERFORM
>> AS DESCRIBED OR FOR ANY DAMAGES WHICH YOU MIGHT INCUR THROUGH YOUR USE OF
>> THIS SOFTWARE. YOU AGREE WITH THESE TERMS IMPLICITLY THROUGH YOUR USE OF
>> THIS SOFTWARE.
***************************************************************************/
07/14/92/JDP
------------
CORRECTIONS TO DOCUMENTATION for TDataEntry v1.0
================================================
The following are comments/corrections to documentation provided with
class TDataEntry in file TDE.ZIP.
IMPORTANT NOTICE - ALL FILES
----------------------------
Please note the addition of a disclaimer to the copyright notice above.
This applies to all files included with TDE.ZIP.
file TDE.MAN
------------
line 97:
Replace:
'The TDEDate object uses TDEData::defCentury...'
With:
'The TDEDate object uses TDEDate::defCentury...'
line 158:
Replace:
'//** let TTarHistory grab this one'
With:
'//** let THistory grab this one'
lines 174 - 178:
All references to 'TTarHistory' should be 'THistory'.
You don't need to declare an 'icon' member. I copied the fragment from
an object (TTarHistory) I'd derived which overrode THistory::draw(); this
required an 'icon' member. As presented, the code fragment does NOT
require a new 'icon' member.
file TDE.DOC
------------
line 437:
The description of TDEDate omits the data type: it's unsigned long and
is stored in YYYYMMDD format regardless of how TDEDate::defFormat is set.
This makes it easy to compare dates and use them for keys in a data file.
TDEDate MODIFICATION
--------------------
TDEDate has a major duplication of code in its validData() function. You
can eliminate this by doing the following:
1) After line 175, insert a new line 176 which declares an unsigned long:
ADD THIS --> ulong date; //* ulong is a typedef
The next step refers to line numbers which are correct AFTER this
addition is made.
2) Replace the entire block which starts at line 186. This block begins
with 'if ( dataOK && len )' and ends at line 221. Replace this block
with the following code:
if ( dataOK && len )
{ //* JDP 07/14/92 cut duplicate code
getData(&date); //* by calling getData()
m = (int)((date % 10000) / 100 );
d = (int)(date % 100 );
y = (int)(date / 10000);
if ( m < 1 || m > 12 || d < 1 || y < 1800 ||
y > 3000 || d > DaysInMonth(m, y)
)
dataOK = False;
}
/*********************** TDTXT1.DOC ends ******************************/